home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / OCEMail.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  49.0 KB  |  1,676 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        OCEMail.p
  3.  
  4.      Contains:    Apple Open Collaboration Environment OCEMail Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT OCEMail;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __OCEMAIL__}
  28. {$SETC __OCEMAIL__ := 1}
  29.  
  30. {$I+}
  31. {$SETC OCEMailIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __FILES__}
  38. {$I Files.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __TEXTEDIT__}
  41. {$I TextEdit.p}
  42. {$ENDC}
  43.  
  44. {$IFC UNDEFINED __DIGITALSIGNATURE__}
  45. {$I DigitalSignature.p}
  46. {$ENDC}
  47. {$IFC UNDEFINED __OCE__}
  48. {$I OCE.p}
  49. {$ENDC}
  50. {$IFC UNDEFINED __OCEAUTHDIR__}
  51. {$I OCEAuthDir.p}
  52. {$ENDC}
  53. {$IFC UNDEFINED __OCEMESSAGING__}
  54. {$I OCEMessaging.p}
  55. {$ENDC}
  56.  
  57.  
  58. {$PUSH}
  59. {$ALIGN MAC68K}
  60. {$LibExport+}
  61.  
  62. {************************************************************************************}
  63. { Common Definitions }
  64. {************************************************************************************}
  65.  
  66. { reference to a new or open letter or message }
  67.  
  68. TYPE
  69.     MailMsgRef                            = LONGINT;
  70. { reference to an open msam queue }
  71.     MSAMQueueRef                        = LONGINT;
  72. { identifies slots managed by a PMSAM }
  73.     MSAMSlotID                            = INTEGER;
  74. { reference to an active mailbox }
  75.     MailboxRef                            = LONGINT;
  76. { identifies slots within a mailbox }
  77.     MailSlotID                            = INTEGER;
  78. { identifies a letter in a mailbox }
  79.     MailSeqNumPtr = ^MailSeqNum;
  80.     MailSeqNum = RECORD
  81.         slotID:                    MailSlotID;
  82.         seqNum:                    LONGINT;
  83.     END;
  84.  
  85. { A MailBuffer is used to describe a buffer used for an IO operation.
  86. The location of the buffer is pointed to by 'buffer'. 
  87. When reading, the size of the buffer is 'bufferSize' 
  88. and the size of data actually read is 'dataSize'.
  89. When writing, the size of data to be written is 'bufferSize' 
  90. and the size of data actually written is 'dataSize'.
  91. }
  92.     MailBufferPtr = ^MailBuffer;
  93.     MailBuffer = RECORD
  94.         bufferSize:                LONGINT;
  95.         buffer:                    Ptr;
  96.         dataSize:                LONGINT;
  97.     END;
  98.  
  99. { A MailReply is used to describe a commonly used reply buffer format.
  100. It contains a count of tuples followed by an array of tuples.
  101. The format of the tuple itself depends on each particular call.
  102. }
  103.     MailReplyPtr = ^MailReply;
  104.     MailReply = RECORD
  105.         tupleCount:                INTEGER;
  106.                                                                         {  tuple[tupleCount]  }
  107.     END;
  108.  
  109. { Shared Memory Communication Area used when Mail Manager sends 
  110. High Level Events to a PMSAM. 
  111. }
  112.     SMCAPtr = ^SMCA;
  113.     SMCA = RECORD
  114.         smcaLength:                INTEGER;                                {  includes size of smcaLength field  }
  115.         result:                    OSErr;
  116.         userBytes:                LONGINT;
  117.         CASE INTEGER OF
  118.         0: (
  119.             slotCID:            CreationID;                                {  for create/modify/delete slot calls  }
  120.             );
  121.         1: (
  122.             msgHint:            LONGINT;                                {  for kMailEPPCMsgOpened  }
  123.             );
  124.     END;
  125.  
  126. {************************************************************************************}
  127. { Value of creator and types fields for messages and blocks defined by MailManager }
  128.  
  129. CONST
  130.     kMailAppleMailCreator        = 'apml';                        {  message and letter block creator  }
  131.     kMailLtrMsgType                = 'lttr';                        {  message type of letters, reports  }
  132.     kMailLtrHdrType                = 'lthd';                        {  contains letter header  }
  133.     kMailContentType            = 'body';                        {  contains content of letter  }
  134.     kMailEnclosureListType        = 'elst';                        {  contains list of enclosures  }
  135.     kMailEnclosureDesktopType    = 'edsk';                        {  contains desktop mgr info for enclosures  }
  136.     kMailEnclosureFileType        = 'asgl';                        {  contains a file enclosure, format is defined by AppleSingle  }
  137.     kMailImageBodyType            = 'imag';                        {  contains image of letter  }
  138.     kMailMSAMType                = 'gwyi';                        {  contains msam specific information  }
  139.     kMailTunnelLtrType            = 'tunl';                        {  used to read a tunnelled message  }
  140.     kMailHopInfoType            = 'hopi';                        {  used to read hopInfo for a tunnelled message  }
  141.     kMailReportType                = 'rpti';                        {  contains report info  }
  142.     kMailFamily                    = 'mail';                        {  Defines family of "mail" msgs: content, header, etc  }
  143.     kMailFamilyFile                = 'file';                        {  Defines family of "direct display" msgs  }
  144.  
  145. {    
  146. kMailImageBodyType:
  147.     format is struct TPfPgDir - in Printing.h
  148.     *    struct TPfPgDir (
  149.     *        short    pageCount;        - number of pages in the image.
  150.     *        long    iPgPos[129];    - iPgPos[n] is the offset from the start of the block
  151.     *                                - to image of page n.
  152.     *                                - iPgPos[n+1] - iPgPos[n] is the length of page n.
  153.  
  154. kMailReportType:
  155. Reports have the isReport bit set in MailIndications and contain a block of type kMailReport.
  156. This block has a header, IPMReportBlockHeader,
  157. followed by an array of elements, each of type IPMRecipientReport
  158.  
  159. Various families used by mail or related msgs
  160. }
  161.  
  162.  
  163. {************************************************************************************}
  164.  
  165. TYPE
  166.     MailAttributeID                        = INTEGER;
  167. { Values of MailAttributeID }
  168. { Message store attributes - stored in the catalog }
  169. { Will always be present in a letter and have fixed sizes }
  170.  
  171. CONST
  172.     kMailLetterFlagsBit            = 1;                            {  MailLetterFlags  }
  173.                                                                 {  Letter attributes - stored in the letter will always be present in a letter and have fixed sizes  }
  174.     kMailIndicationsBit            = 3;                            {  MailIndications  }
  175.     kMailMsgTypeBit                = 4;                            {  OCECreatorType  }
  176.     kMailLetterIDBit            = 5;                            {  MailLetterID  }
  177.     kMailSendTimeStampBit        = 6;                            {  MailTime  }
  178.     kMailNestingLevelBit        = 7;                            {  MailNestingLevel  }
  179.     kMailMsgFamilyBit            = 8;                            {  OSType  }
  180.                                                                 {  Letter attributes - stored in the letter may be present in a letter and have fixed sizes  }
  181.     kMailReplyIDBit                = 9;                            {  MailLetterID  }
  182.     kMailConversationIDBit        = 10;                            {  MailLetterID  }
  183.                                                                 {  Letter attributes - stored in the letter may be present in a letter and have variable length sizes  }
  184.     kMailSubjectBit                = 11;                            {  RString  }
  185.     kMailFromBit                = 12;                            {  MailRecipient  }
  186.     kMailToBit                    = 13;                            {  MailRecipient  }
  187.     kMailCcBit                    = 14;                            {  MailRecipient  }
  188.     kMailBccBit                    = 15;                            {  MailRecipient  }
  189.  
  190.  
  191. TYPE
  192.     MailAttributeMask                    = LONGINT;
  193. { Values of MailAttributeMask }
  194.  
  195. CONST
  196.     kMailLetterFlagsMask        = $00000001;
  197.     kMailIndicationsMask        = $00000004;
  198.     kMailMsgTypeMask            = $00000008;
  199.     kMailLetterIDMask            = $00000010;
  200.     kMailSendTimeStampMask        = $00000020;
  201.     kMailNestingLevelMask        = $00000040;
  202.     kMailMsgFamilyMask            = $00000080;
  203.     kMailReplyIDMask            = $00000100;
  204.     kMailConversationIDMask        = $00000200;
  205.     kMailSubjectMask            = $00000400;
  206.     kMailFromMask                = $00000800;
  207.     kMailToMask                    = $00001000;
  208.     kMailCcMask                    = $00002000;
  209.     kMailBccMask                = $00004000;
  210.  
  211.  
  212. TYPE
  213.     MailAttributeBitmap                    = LONGINT;
  214. {************************************************************************************}
  215.     MailLetterSystemFlags                = INTEGER;
  216. { Values of MailLetterSystemFlags }
  217. { letter is available locally (either by nature or via cache) }
  218.  
  219. CONST
  220.     kMailIsLocalBit                = 2;
  221.  
  222.     kMailIsLocalMask            = $00000004;
  223.  
  224.  
  225. TYPE
  226.     MailLetterUserFlags                    = INTEGER;
  227.  
  228. CONST
  229.     kMailReadBit                = 0;                            {  this letter has been opened  }
  230.     kMailDontArchiveBit            = 1;                            {  this letter is not to be archived either because it has already been archived or it should not be archived.  }
  231.     kMailInTrashBit                = 2;                            {  this letter is in trash  }
  232.  
  233. { Values of MailLetterUserFlags }
  234.     kMailReadMask                = $00000001;
  235.     kMailDontArchiveMask        = $00000002;
  236.     kMailInTrashMask            = $00000004;
  237.  
  238.  
  239. TYPE
  240.     MailLetterFlagsPtr = ^MailLetterFlags;
  241.     MailLetterFlags = RECORD
  242.         sysFlags:                MailLetterSystemFlags;
  243.         userFlags:                MailLetterUserFlags;
  244.     END;
  245.  
  246.     MailMaskedLetterFlagsPtr = ^MailMaskedLetterFlags;
  247.     MailMaskedLetterFlags = RECORD
  248.         flagMask:                MailLetterFlags;                        {  flags that are to be set  }
  249.         flagValues:                MailLetterFlags;                        {  and their values  }
  250.     END;
  251.  
  252.  
  253. CONST
  254.     kMailOriginalInReportBit    = 1;
  255.     kMailNonReceiptReportsBit    = 3;
  256.     kMailReceiptReportsBit        = 4;
  257.     kMailForwardedBit            = 5;
  258.     kMailPriorityBit            = 6;
  259.     kMailIsReportWithOriginalBit = 8;
  260.     kMailIsReportBit            = 9;
  261.     kMailHasContentBit            = 10;
  262.     kMailHasSignatureBit        = 11;
  263.     kMailAuthenticatedBit        = 12;
  264.     kMailSentBit                = 13;
  265.     kMailNativeContentBit        = 14;
  266.     kMailImageContentBit        = 15;
  267.     kMailStandardContentBit        = 16;
  268.  
  269. { Values of MailIndications }
  270.     kMailStandardContentMask    = $00008000;
  271.     kMailImageContentMask        = $00004000;
  272.     kMailNativeContentMask        = $00002000;
  273.     kMailSentMask                = $00001000;
  274.     kMailAuthenticatedMask        = $00000800;
  275.     kMailHasSignatureMask        = $00000400;
  276.     kMailHasContentMask            = $00000200;
  277.     kMailIsReportMask            = $00000100;
  278.     kMailIsReportWithOriginalMask = $00000080;
  279.     kMailPriorityMask            = $00000060;
  280.     kMailForwardedMask            = $00000010;
  281.     kMailReceiptReportsMask        = $00000008;
  282.     kMailNonReceiptReportsMask    = $00000004;
  283.     kMailOriginalInReportMask    = $00000003;
  284.  
  285.  
  286. TYPE
  287.     MailIndications                        = LONGINT;
  288. { values of the field originalInReport in MailIndications }
  289.  
  290. CONST
  291.     kMailNoOriginal                = 0;                            {  do not enclose original in reports  }
  292.     kMailEncloseOnNonReceipt    = 3;                            {  enclose original in non-delivery reports  }
  293.  
  294.  
  295. TYPE
  296.     MailLetterID                        = IPMMsgID;
  297.     MailLetterIDPtr                     = ^MailLetterID;
  298.     MailTimePtr = ^MailTime;
  299.     MailTime = RECORD
  300.         time:                    UTCTime;                                {  current UTC(GMT) time  }
  301.         offset:                    UTCOffset;                                {  offset from GMT  }
  302.     END;
  303.  
  304. { innermost letter has nestingLevel 0 }
  305.     MailNestingLevel                    = INTEGER;
  306.     MailRecipient                        = OCERecipient;
  307.     MailRecipientPtr                     = ^MailRecipient;
  308. {************************************************************************************}
  309.  
  310. CONST
  311.     kMailTextSegmentBit            = 0;
  312.     kMailPictSegmentBit            = 1;
  313.     kMailSoundSegmentBit        = 2;
  314.     kMailStyledTextSegmentBit    = 3;
  315.     kMailMovieSegmentBit        = 4;
  316.  
  317.  
  318. TYPE
  319.     MailSegmentMask                        = INTEGER;
  320. { Values of MailSegmentMask }
  321.  
  322. CONST
  323.     kMailTextSegmentMask        = $00000001;
  324.     kMailPictSegmentMask        = $00000002;
  325.     kMailSoundSegmentMask        = $00000004;
  326.     kMailStyledTextSegmentMask    = $00000008;
  327.     kMailMovieSegmentMask        = $00000010;
  328.  
  329.  
  330. TYPE
  331.     MailSegmentType                        = INTEGER;
  332. { Values of MailSegmentType }
  333.  
  334. CONST
  335.     kMailInvalidSegmentType        = 0;
  336.     kMailTextSegmentType        = 1;
  337.     kMailPictSegmentType        = 2;
  338.     kMailSoundSegmentType        = 3;
  339.     kMailStyledTextSegmentType    = 4;
  340.     kMailMovieSegmentType        = 5;
  341.  
  342. {************************************************************************************}
  343.     kMailErrorLogEntryVersion    = $0101;
  344.     kMailMSAMErrorStringListID    = 128;                            {  These 'STR#' resources should be  }
  345.     kMailMSAMActionStringListID    = 129;                            {  in the PMSAM resource fork  }
  346.  
  347.  
  348. TYPE
  349.     MailLogErrorType                    = INTEGER;
  350. { Values of MailLogErrorType }
  351.  
  352. CONST
  353.     kMailELECorrectable            = 0;
  354.     kMailELEError                = 1;
  355.     kMailELEWarning                = 2;
  356.     kMailELEInformational        = 3;
  357.  
  358.  
  359. TYPE
  360.     MailLogErrorCode                    = INTEGER;
  361. { Values of MailLogErrorCode }
  362.  
  363. CONST
  364.     kMailMSAMErrorCode            = 0;                            {  positive codes are indices into PMSAM defined strings  }
  365.     kMailMiscError                = -1;                            {  negative codes are OCE defined  }
  366.     kMailNoModem                = -2;                            {  modem required, but missing  }
  367.  
  368.  
  369. TYPE
  370.     MailErrorLogEntryInfoPtr = ^MailErrorLogEntryInfo;
  371.     MailErrorLogEntryInfo = RECORD
  372.         version:                INTEGER;
  373.         timeOccurred:            UTCTime;                                {  do not fill in  }
  374.         reportingPMSAM:            Str31;                                    {  do not fill in  }
  375.         reportingMSAMSlot:        Str31;                                    {  do not fill in  }
  376.         errorType:                MailLogErrorType;
  377.         errorCode:                MailLogErrorCode;
  378.         errorResource:            INTEGER;                                {  resources are valid if  }
  379.         actionResource:            INTEGER;                                {  errorCode = kMailMSAMErrorCode index starts from 1  }
  380.         filler:                    LONGINT;
  381.         filler2:                INTEGER;
  382.     END;
  383.  
  384. {************************************************************************************}
  385.     MailBlockMode                        = INTEGER;
  386. { Values of MailBlockMode }
  387.  
  388. CONST
  389.     kMailFromStart                = 1;                            {  write data from offset calculated from  }
  390.     kMailFromLEOB                = 2;                            {  start of block, end of block,  }
  391.     kMailFromMark                = 3;                            {  or from the current mark  }
  392.  
  393.  
  394. TYPE
  395.     MailEnclosureInfoPtr = ^MailEnclosureInfo;
  396.     MailEnclosureInfo = RECORD
  397.         enclosureName:            StringPtr;
  398.         catInfo:                CInfoPBPtr;
  399.         comment:                StringPtr;
  400.         icon:                    Ptr;
  401.     END;
  402.  
  403. {************************************************************************************}
  404.  
  405. CONST
  406.     kOCESetupLocationNone        = 0;                            {  disconnect state  }
  407.     kOCESetupLocationMax        = 8;                            {  maximum location value  }
  408.  
  409.  
  410. TYPE
  411.     OCESetupLocation                    = CHAR;
  412. { location state is a bitmask, 0x1=>1st location active, 
  413.  * 0x2 => 2nd, 0x4 => 3rd, etc.
  414.  }
  415.     MailLocationFlags                    = UInt8;
  416.     MailLocationInfoPtr = ^MailLocationInfo;
  417.     MailLocationInfo = RECORD
  418.         location:                SInt8;
  419.         active:                    SInt8;
  420.     END;
  421.  
  422. {************************************************************************************}
  423. { Definitions for Personal MSAMs }
  424. {************************************************************************************}
  425.  
  426. CONST
  427.     kMailEPPCMsgVersion            = 3;
  428.  
  429.  
  430. TYPE
  431.     MailEPPCMsgPtr = ^MailEPPCMsg;
  432.     MailEPPCMsg = RECORD
  433.         version:                INTEGER;
  434.         CASE INTEGER OF
  435.         0: (
  436.             theSMCA:            SMCAPtr;                                {  for 'crsl', 'mdsl', 'dlsl', 'sndi', 'msgo', 'admn'  }
  437.             );
  438.         1: (
  439.             sequenceNumber:        LONGINT;                                {  for 'inqu', 'dlom'  }
  440.             );
  441.         2: (
  442.             locationInfo:        MailLocationInfo;                        {  for 'locc'  }
  443.             );
  444.     END;
  445.  
  446. { Values of OCE defined High Level Event message classes }
  447.  
  448. CONST
  449.     kMailEPPCCreateSlot            = 'crsl';
  450.     kMailEPPCModifySlot            = 'mdsl';
  451.     kMailEPPCDeleteSlot            = 'dlsl';
  452.     kMailEPPCShutDown            = 'quit';
  453.     kMailEPPCMailboxOpened        = 'mbop';
  454.     kMailEPPCMailboxClosed        = 'mbcl';
  455.     kMailEPPCMsgPending            = 'msgp';
  456.     kMailEPPCSendImmediate        = 'sndi';
  457.     kMailEPPCContinue            = 'cont';
  458.     kMailEPPCSchedule            = 'sked';
  459.     kMailEPPCAdmin                = 'admn';
  460.     kMailEPPCInQUpdate            = 'inqu';
  461.     kMailEPPCMsgOpened            = 'msgo';
  462.     kMailEPPCDeleteOutQMsg        = 'dlom';
  463.     kMailEPPCWakeup                = 'wkup';
  464.     kMailEPPCLocationChanged    = 'locc';
  465.  
  466.  
  467. TYPE
  468.     MailTimerPtr = ^MailTimer;
  469.     MailTimer = RECORD
  470.         CASE INTEGER OF
  471.         0: (
  472.             frequency:            LONGINT;                                {  how often to connect  }
  473.             );
  474.         1: (
  475.             connectTime:        LONGINT;                                {  time since midnight  }
  476.             );
  477.     END;
  478.  
  479.  
  480. CONST
  481.     kMailTimerOff                = 0;                            {  control is off  }
  482.     kMailTimerTime                = 1;                            {  specifies connect time (relative to midnight)  }
  483.     kMailTimerFrequency            = 2;                            {  specifies connect frequency  }
  484.  
  485.  
  486. TYPE
  487.     MailTimerKind                        = Byte;
  488.     MailTimersPtr = ^MailTimers;
  489.     MailTimers = RECORD
  490.         sendTimeKind:            SInt8;                                    {  either kMailTimerTime or kMailTimerFrequency  }
  491.         receiveTimeKind:        SInt8;                                    {  either kMailTimerTime or kMailTimerFrequency  }
  492.         send:                    MailTimer;
  493.         receive:                MailTimer;
  494.     END;
  495.  
  496.  
  497.     MailStandardSlotInfoAttributePtr = ^MailStandardSlotInfoAttribute;
  498.     MailStandardSlotInfoAttribute = RECORD
  499.         version:                INTEGER;
  500.         active:                    SInt8;                                    {  active if MailLocationMask(i) is set  }
  501.         padByte:                SInt8;
  502.         sendReceiveTimer:        MailTimers;
  503.     END;
  504.  
  505.     MSAMIOCompletionProcPtr = Register68kProcPtr;  { PROCEDURE MSAMIOCompletion(VAR paramBlock: TempMSAMParam); }
  506.  
  507.     MSAMIOCompletionUPP = UniversalProcPtr;
  508.     PMSAMGetMSAMRecordPBPtr = ^PMSAMGetMSAMRecordPB;
  509.     PMSAMGetMSAMRecordPB = RECORD
  510.         qLink:                    Ptr;
  511.         reservedH1:                LONGINT;
  512.         reservedH2:                LONGINT;
  513.         ioCompletion:            MSAMIOCompletionUPP;
  514.         ioResult:                OSErr;
  515.         saveA5:                    LONGINT;
  516.         reqCode:                INTEGER;
  517.         msamCID:                CreationID;
  518.     END;
  519.  
  520.     PMSAMOpenQueuesPBPtr = ^PMSAMOpenQueuesPB;
  521.     PMSAMOpenQueuesPB = RECORD
  522.         qLink:                    Ptr;
  523.         reservedH1:                LONGINT;
  524.         reservedH2:                LONGINT;
  525.         ioCompletion:            MSAMIOCompletionUPP;
  526.         ioResult:                OSErr;
  527.         saveA5:                    LONGINT;
  528.         reqCode:                INTEGER;
  529.         inQueueRef:                MSAMQueueRef;
  530.         outQueueRef:            MSAMQueueRef;
  531.         msamSlotID:                MSAMSlotID;
  532.         filler:                    ARRAY [0..1] OF LONGINT;
  533.     END;
  534.  
  535.     PMSAMStatus                            = INTEGER;
  536. { Values of PMSAMStatus }
  537.  
  538. CONST
  539.     kPMSAMStatusPending            = 1;                            {  for inQueue and outQueue  }
  540.     kPMSAMStatusError            = 2;                            {  for inQueue and outQueue  }
  541.     kPMSAMStatusSending            = 3;                            {  for outQueue only  }
  542.     kPMSAMStatusCaching            = 4;                            {  for inQueue only  }
  543.     kPMSAMStatusSent            = 5;                            {  for outQueue only  }
  544.  
  545.  
  546. TYPE
  547.     PMSAMSetStatusPBPtr = ^PMSAMSetStatusPB;
  548.     PMSAMSetStatusPB = RECORD
  549.         qLink:                    Ptr;
  550.         reservedH1:                LONGINT;
  551.         reservedH2:                LONGINT;
  552.         ioCompletion:            MSAMIOCompletionUPP;
  553.         ioResult:                OSErr;
  554.         saveA5:                    LONGINT;
  555.         reqCode:                INTEGER;
  556.         queueRef:                MSAMQueueRef;
  557.         seqNum:                    LONGINT;
  558.         msgHint:                LONGINT;                                {  for posting cache error,set this to 0 when report outq status  }
  559.         status:                    PMSAMStatus;
  560.     END;
  561.  
  562.     PMSAMLogErrorPBPtr = ^PMSAMLogErrorPB;
  563.     PMSAMLogErrorPB = RECORD
  564.         qLink:                    Ptr;
  565.         reservedH1:                LONGINT;
  566.         reservedH2:                LONGINT;
  567.         ioCompletion:            MSAMIOCompletionUPP;
  568.         ioResult:                OSErr;
  569.         saveA5:                    LONGINT;
  570.         reqCode:                INTEGER;
  571.         msamSlotID:                MSAMSlotID;                                {  0 for PMSAM errors  }
  572.         logEntry:                MailErrorLogEntryInfoPtr;
  573.         filler:                    ARRAY [0..1] OF LONGINT;
  574.     END;
  575.  
  576. {**************************************************************************************}
  577.  
  578. CONST
  579.     kMailMsgSummaryVersion        = 1;
  580.  
  581.  
  582. TYPE
  583.     MailMasterDataPtr = ^MailMasterData;
  584.     MailMasterData = RECORD
  585.         attrMask:                MailAttributeBitmap;                    {  indicates attributes present in MsgSummary  }
  586.         messageID:                MailLetterID;
  587.         replyID:                MailLetterID;
  588.         conversationID:            MailLetterID;
  589.     END;
  590.  
  591. { Values for addressedToMe in struct MailCoreData }
  592.  
  593. CONST
  594.     kAddressedAs_TO                = $01;
  595.     kAddressedAs_CC                = $02;
  596.     kAddressedAs_BCC            = $04;
  597.  
  598.  
  599. TYPE
  600.     MailCoreDataPtr = ^MailCoreData;
  601.     MailCoreData = RECORD
  602.         letterFlags:            MailLetterFlags;
  603.         messageSize:            LONGINT;
  604.         letterIndications:        MailIndications;
  605.         messageType:            OCECreatorType;
  606.         sendTime:                MailTime;
  607.         messageFamily:            OSType;
  608.         reserved:                SInt8;
  609.         addressedToMe:            SInt8;
  610.         agentInfo:                PACKED ARRAY [0..5] OF CHAR;            {  6 bytes of special info [set to zero]  }
  611.                                                                         {  these are variable length and even padded  }
  612.         sender:                    RString32;                                {  recipient's entityName (trunc) }
  613.         subject:                RString32;                                {  subject maybe truncated  }
  614.     END;
  615.  
  616.     MSAMMsgSummaryPtr = ^MSAMMsgSummary;
  617.     MSAMMsgSummary = RECORD
  618.         version:                INTEGER;                                {  following flags are defaulted by Toolbox  }
  619.         msgDeleted:                BOOLEAN;                                {  true if msg is to be deleted by PMSAM  }
  620.         msgUpdated:                BOOLEAN;                                {  true if msgSummary was updated by MailManager  }
  621.         msgCached:                BOOLEAN;                                {  true if msg is in the slot's InQueue  }
  622.         padByte:                SInt8;
  623.         masterData:                MailMasterData;
  624.         coreData:                MailCoreData;
  625.     END;
  626.  
  627. { PMSAM can put up to 128 bytes of private msg summary data }
  628.  
  629. CONST
  630.     kMailMaxPMSAMMsgSummaryData    = 128;
  631.  
  632.  
  633. TYPE
  634.     PMSAMCreateMsgSummaryPBPtr = ^PMSAMCreateMsgSummaryPB;
  635.     PMSAMCreateMsgSummaryPB = RECORD
  636.         qLink:                    Ptr;
  637.         reservedH1:                LONGINT;
  638.         reservedH2:                LONGINT;
  639.         ioCompletion:            MSAMIOCompletionUPP;
  640.         ioResult:                OSErr;
  641.         saveA5:                    LONGINT;
  642.         reqCode:                INTEGER;
  643.         inQueueRef:                MSAMQueueRef;
  644.         seqNum:                    LONGINT;                                {  <- seq of the new message  }
  645.         msgSummary:                MSAMMsgSummaryPtr;                        {  attributes and mask filled in  }
  646.         buffer:                    MailBufferPtr;                            {  PMSAM specific data to be appended  }
  647.     END;
  648.  
  649.  
  650.     PMSAMPutMsgSummaryPBPtr = ^PMSAMPutMsgSummaryPB;
  651.     PMSAMPutMsgSummaryPB = RECORD
  652.         qLink:                    Ptr;
  653.         reservedH1:                LONGINT;
  654.         reservedH2:                LONGINT;
  655.         ioCompletion:            MSAMIOCompletionUPP;
  656.         ioResult:                OSErr;
  657.         saveA5:                    LONGINT;
  658.         reqCode:                INTEGER;
  659.         inQueueRef:                MSAMQueueRef;
  660.         seqNum:                    LONGINT;
  661.         letterFlags:            MailMaskedLetterFlagsPtr;                {  if not nil, then set msgStoreFlags  }
  662.         buffer:                    MailBufferPtr;                            {  PMSAM specific data to be overwritten  }
  663.     END;
  664.  
  665.     PMSAMGetMsgSummaryPBPtr = ^PMSAMGetMsgSummaryPB;
  666.     PMSAMGetMsgSummaryPB = RECORD
  667.         qLink:                    Ptr;
  668.         reservedH1:                LONGINT;
  669.         reservedH2:                LONGINT;
  670.         ioCompletion:            MSAMIOCompletionUPP;
  671.         ioResult:                OSErr;
  672.         saveA5:                    LONGINT;
  673.         reqCode:                INTEGER;
  674.         inQueueRef:                MSAMQueueRef;
  675.         seqNum:                    LONGINT;
  676.         msgSummary:                MSAMMsgSummaryPtr;                        {  if not nil, then read in the msgSummary  }
  677.         buffer:                    MailBufferPtr;                            {  PMSAM specific data to be read  }
  678.         msgSummaryOffset:        INTEGER;                                {  offset of PMSAM specific data from start of MsgSummary  }
  679.     END;
  680.  
  681. {**************************************************************************************}
  682. { Definitions for Server MSAMs }
  683. {************************************************************************************}
  684.     SMSAMAdminCode                        = INTEGER;
  685. { Values of SMSAMAdminCode }
  686.  
  687. CONST
  688.     kSMSAMNotifyFwdrSetupChange    = 1;
  689.     kSMSAMNotifyFwdrNameChange    = 2;
  690.     kSMSAMNotifyFwdrPwdChange    = 3;
  691.     kSMSAMGetDynamicFwdrParams    = 4;
  692.  
  693.  
  694. TYPE
  695.     SMSAMSlotChanges                    = LONGINT;
  696.  
  697. CONST
  698.     kSMSAMFwdrHomeInternetChangedBit = 0;
  699.     kSMSAMFwdrConnectedToChangedBit = 1;
  700.     kSMSAMFwdrForeignRLIsChangedBit = 2;
  701.     kSMSAMFwdrMnMServerChangedBit = 3;
  702.  
  703. { Values of SMSAMSlotChanges }
  704.     kSMSAMFwdrEverythingChangedMask = -1;
  705.     kSMSAMFwdrHomeInternetChangedMask = $00000001;
  706.     kSMSAMFwdrConnectedToChangedMask = $00000002;
  707.     kSMSAMFwdrForeignRLIsChangedMask = $00000004;
  708.     kSMSAMFwdrMnMServerChangedMask = $00000008;
  709.  
  710. { kSMSAMNotifyFwdrSetupChange }
  711.  
  712. TYPE
  713.     SMSAMSetupChangePtr = ^SMSAMSetupChange;
  714.     SMSAMSetupChange = RECORD
  715.         whatChanged:            SMSAMSlotChanges;                        {   --> bitmap of what parameters changed  }
  716.         serverHint:                AddrBlock;                                {   --> try this ADAP server first  }
  717.     END;
  718.  
  719. { kSMSAMNotifyFwdrNameChange }
  720.     SMSAMNameChangePtr = ^SMSAMNameChange;
  721.     SMSAMNameChange = RECORD
  722.         newName:                RString;                                {   --> msams new name  }
  723.         serverHint:                AddrBlock;                                {   --> try this ADAP server first  }
  724.     END;
  725.  
  726. { kSMSAMNotifyFwdrPasswordChange }
  727.     SMSAMPasswordChangePtr = ^SMSAMPasswordChange;
  728.     SMSAMPasswordChange = RECORD
  729.         newPassword:            RString;                                {   --> msams new password  }
  730.         serverHint:                AddrBlock;                                {   --> try this ADAP server first  }
  731.     END;
  732.  
  733. { kSMSAMGetDynamicFwdrParams }
  734.     SMSAMDynamicParamsPtr = ^SMSAMDynamicParams;
  735.     SMSAMDynamicParams = RECORD
  736.         curDiskUsed:            LONGINT;                                {  <--  amount of disk space used by msam  }
  737.         curMemoryUsed:            LONGINT;                                {  <--  amount of memory used by msam  }
  738.     END;
  739.  
  740.     SMSAMAdminEPPCRequestPtr = ^SMSAMAdminEPPCRequest;
  741.     SMSAMAdminEPPCRequest = RECORD
  742.         adminCode:                SMSAMAdminCode;
  743.         CASE INTEGER OF
  744.         0: (
  745.             setupChange:        SMSAMSetupChange;
  746.             );
  747.         1: (
  748.             nameChange:            SMSAMNameChange;
  749.             );
  750.         2: (
  751.             passwordChange:        SMSAMPasswordChange;
  752.             );
  753.         3: (
  754.             dynamicParams:        SMSAMDynamicParams;
  755.             );
  756.     END;
  757.  
  758.     SMSAMSetupPBPtr = ^SMSAMSetupPB;
  759.     SMSAMSetupPB = RECORD
  760.         qLink:                    Ptr;
  761.         reservedH1:                LONGINT;
  762.         reservedH2:                LONGINT;
  763.         ioCompletion:            MSAMIOCompletionUPP;
  764.         ioResult:                OSErr;
  765.         saveA5:                    LONGINT;
  766.         reqCode:                INTEGER;
  767.         serverMSAM:                RecordIDPtr;
  768.         password:                RStringPtr;
  769.         gatewayType:            OSType;
  770.         gatewayTypeDescription:    RStringPtr;
  771.         catalogServerHint:        AddrBlock;
  772.     END;
  773.  
  774.     SMSAMStartupPBPtr = ^SMSAMStartupPB;
  775.     SMSAMStartupPB = RECORD
  776.         qLink:                    Ptr;
  777.         reservedH1:                LONGINT;
  778.         reservedH2:                LONGINT;
  779.         ioCompletion:            MSAMIOCompletionUPP;
  780.         ioResult:                OSErr;
  781.         saveA5:                    LONGINT;
  782.         reqCode:                INTEGER;
  783.         msamIdentity:            AuthIdentity;
  784.         queueRef:                MSAMQueueRef;
  785.     END;
  786.  
  787.     SMSAMShutdownPBPtr = ^SMSAMShutdownPB;
  788.     SMSAMShutdownPB = RECORD
  789.         qLink:                    Ptr;
  790.         reservedH1:                LONGINT;
  791.         reservedH2:                LONGINT;
  792.         ioCompletion:            MSAMIOCompletionUPP;
  793.         ioResult:                OSErr;
  794.         saveA5:                    LONGINT;
  795.         reqCode:                INTEGER;
  796.         queueRef:                MSAMQueueRef;
  797.     END;
  798.  
  799. {**************************************************************************************}
  800. { Definitions for reading and writing MSAM Letters }
  801. {**************************************************************************************}
  802.     MSAMEnumeratePBPtr = ^MSAMEnumeratePB;
  803.     MSAMEnumeratePB = RECORD
  804.         qLink:                    Ptr;
  805.         reservedH1:                LONGINT;
  806.         reservedH2:                LONGINT;
  807.         ioCompletion:            MSAMIOCompletionUPP;
  808.         ioResult:                OSErr;
  809.         saveA5:                    LONGINT;
  810.         reqCode:                INTEGER;
  811.         queueRef:                MSAMQueueRef;
  812.         startSeqNum:            LONGINT;
  813.         nextSeqNum:                LONGINT;
  814.                                                                         {  buffer contains a Mail Reply. Each tuple is a MSAMEnumerateInQReply when enumerating the inQueue MSAMEnumerateOutQReply when enumerating the outQueue  }
  815.         buffer:                    MailBuffer;
  816.     END;
  817.  
  818.     MSAMEnumerateInQReplyPtr = ^MSAMEnumerateInQReply;
  819.     MSAMEnumerateInQReply = RECORD
  820.         seqNum:                    LONGINT;
  821.         msgDeleted:                BOOLEAN;                                {  true if msg is to be deleted by PMSAM  }
  822.         msgUpdated:                BOOLEAN;                                {  true if MsgSummary has been updated by TB  }
  823.         msgCached:                BOOLEAN;                                {  true if msg is in the incoming queue  }
  824.         padByte:                SInt8;
  825.     END;
  826.  
  827.     MSAMEnumerateOutQReplyPtr = ^MSAMEnumerateOutQReply;
  828.     MSAMEnumerateOutQReply = RECORD
  829.         seqNum:                    LONGINT;
  830.         done:                    BOOLEAN;                                {  true if all responsible recipients have been processed  }
  831.         priority:                SInt8;
  832.         msgFamily:                OSType;
  833.         approxSize:                LONGINT;
  834.         tunnelForm:                BOOLEAN;                                {  true if this letter has to be tunnelled  }
  835.         padByte:                SInt8;
  836.         nextHop:                NetworkSpec;                            {  valid if tunnelForm is true  }
  837.         msgType:                OCECreatorType;
  838.     END;
  839.  
  840.     MSAMDeletePBPtr = ^MSAMDeletePB;
  841.     MSAMDeletePB = RECORD
  842.         qLink:                    Ptr;
  843.         reservedH1:                LONGINT;
  844.         reservedH2:                LONGINT;
  845.         ioCompletion:            MSAMIOCompletionUPP;
  846.         ioResult:                OSErr;
  847.         saveA5:                    LONGINT;
  848.         reqCode:                INTEGER;
  849.         queueRef:                MSAMQueueRef;
  850.         seqNum:                    LONGINT;
  851.         msgOnly:                BOOLEAN;                                {  only valid for PMSAM & inQueue  }
  852.                                                                         {  set true to delete message but not msgSummary  }
  853.         padByte:                SInt8;
  854.                                                                         {  only valid for SMSAM & tunnelled messages  }
  855.         result:                    OSErr;
  856.     END;
  857.  
  858.     MSAMOpenPBPtr = ^MSAMOpenPB;
  859.     MSAMOpenPB = RECORD
  860.         qLink:                    Ptr;
  861.         reservedH1:                LONGINT;
  862.         reservedH2:                LONGINT;
  863.         ioCompletion:            MSAMIOCompletionUPP;
  864.         ioResult:                OSErr;
  865.         saveA5:                    LONGINT;
  866.         reqCode:                INTEGER;
  867.         queueRef:                MSAMQueueRef;
  868.         seqNum:                    LONGINT;
  869.         mailMsgRef:                MailMsgRef;
  870.     END;
  871.  
  872.     MSAMOpenNestedPBPtr = ^MSAMOpenNestedPB;
  873.     MSAMOpenNestedPB = RECORD
  874.         qLink:                    Ptr;
  875.         reservedH1:                LONGINT;
  876.         reservedH2:                LONGINT;
  877.         ioCompletion:            MSAMIOCompletionUPP;
  878.         ioResult:                OSErr;
  879.         saveA5:                    LONGINT;
  880.         reqCode:                INTEGER;
  881.         mailMsgRef:                MailMsgRef;
  882.         nestedRef:                MailMsgRef;
  883.     END;
  884.  
  885.     MSAMClosePBPtr = ^MSAMClosePB;
  886.     MSAMClosePB = RECORD
  887.         qLink:                    Ptr;
  888.         reservedH1:                LONGINT;
  889.         reservedH2:                LONGINT;
  890.         ioCompletion:            MSAMIOCompletionUPP;
  891.         ioResult:                OSErr;
  892.         saveA5:                    LONGINT;
  893.         reqCode:                INTEGER;
  894.         mailMsgRef:                MailMsgRef;
  895.     END;
  896.  
  897.     MSAMGetMsgHeaderPBPtr = ^MSAMGetMsgHeaderPB;
  898.     MSAMGetMsgHeaderPB = RECORD
  899.         qLink:                    Ptr;
  900.         reservedH1:                LONGINT;
  901.         reservedH2:                LONGINT;
  902.         ioCompletion:            MSAMIOCompletionUPP;
  903.         ioResult:                OSErr;
  904.         saveA5:                    LONGINT;
  905.         reqCode:                INTEGER;
  906.         mailMsgRef:                MailMsgRef;
  907.         selector:                SInt8;
  908.         filler1:                BOOLEAN;
  909.         offset:                    LONGINT;
  910.         buffer:                    MailBuffer;
  911.         remaining:                LONGINT;
  912.     END;
  913.  
  914. {    MSAMGetAttributesPB.buffer returned will contain the attribute values of 
  915.     the attributes indicated in responseMask, 
  916.     from the attribute indicated by the least significant bit set
  917.     to the attribute indicated by the most significant bit set.
  918.     Note that recipients - from, to, cc, bcc cannot be read using
  919.     this call. Use GetRecipients to read these. 
  920. }
  921.     MSAMGetAttributesPBPtr = ^MSAMGetAttributesPB;
  922.     MSAMGetAttributesPB = RECORD
  923.         qLink:                    Ptr;
  924.         reservedH1:                LONGINT;
  925.         reservedH2:                LONGINT;
  926.         ioCompletion:            MSAMIOCompletionUPP;
  927.         ioResult:                OSErr;
  928.         saveA5:                    LONGINT;
  929.         reqCode:                INTEGER;
  930.         mailMsgRef:                MailMsgRef;
  931.         requestMask:            MailAttributeBitmap;                    {  kMailIndicationsBit thru kMailSubjectBit  }
  932.         buffer:                    MailBuffer;
  933.         responseMask:            MailAttributeBitmap;
  934.         more:                    BOOLEAN;
  935.         filler1:                BOOLEAN;
  936.     END;
  937.  
  938. { attrID value to get resolved recipient list }
  939.  
  940. CONST
  941.     kMailResolvedList            = 0;
  942.  
  943.  
  944. TYPE
  945.     MailOriginalRecipientPtr = ^MailOriginalRecipient;
  946.     MailOriginalRecipient = RECORD
  947.         index:                    INTEGER;
  948.     END;
  949.  
  950. { Followed by OCEPackedRecipient }
  951.  
  952.  
  953.     MailResolvedRecipientPtr = ^MailResolvedRecipient;
  954.     MailResolvedRecipient = RECORD
  955.         index:                    INTEGER;
  956.         recipientFlags:            INTEGER;
  957.         responsible:            BOOLEAN;
  958.         padByte:                SInt8;
  959.     END;
  960.  
  961. { Followed by OCEPackedRecipient }
  962.  
  963.  
  964. {     MSAMGetRecipientsPB.buffer contains a Mail Reply. Each tuple is a
  965.     MailOriginalRecipient if getting original recipients 
  966.                             ie the attrID is kMail[From, To, Cc, Bcc]Bit
  967.     MailResolvedRecipient if getting resolved reicpients
  968.                             ie the attrID is kMailResolvedList
  969.     Both tuples are word alligned.  
  970. }
  971.     MSAMGetRecipientsPBPtr = ^MSAMGetRecipientsPB;
  972.     MSAMGetRecipientsPB = RECORD
  973.         qLink:                    Ptr;
  974.         reservedH1:                LONGINT;
  975.         reservedH2:                LONGINT;
  976.         ioCompletion:            MSAMIOCompletionUPP;
  977.         ioResult:                OSErr;
  978.         saveA5:                    LONGINT;
  979.         reqCode:                INTEGER;
  980.         mailMsgRef:                MailMsgRef;
  981.         attrID:                    MailAttributeID;                        {  kMailFromBit thru kMailBccBit  }
  982.         startIndex:                INTEGER;                                {  starts at 1  }
  983.         buffer:                    MailBuffer;
  984.         nextIndex:                INTEGER;
  985.         more:                    BOOLEAN;
  986.         filler1:                BOOLEAN;
  987.     END;
  988.  
  989.     MSAMGetContentPBPtr = ^MSAMGetContentPB;
  990.     MSAMGetContentPB = RECORD
  991.         qLink:                    Ptr;
  992.         reservedH1:                LONGINT;
  993.         reservedH2:                LONGINT;
  994.         ioCompletion:            MSAMIOCompletionUPP;
  995.         ioResult:                OSErr;
  996.         saveA5:                    LONGINT;
  997.         reqCode:                INTEGER;
  998.         mailMsgRef:                MailMsgRef;
  999.         segmentMask:            MailSegmentMask;
  1000.         buffer:                    MailBuffer;
  1001.         textScrap:                StScrpRecPtr;
  1002.         script:                    ScriptCode;
  1003.         segmentType:            MailSegmentType;
  1004.         endOfScript:            BOOLEAN;
  1005.         endOfSegment:            BOOLEAN;
  1006.         endOfContent:            BOOLEAN;
  1007.         filler1:                BOOLEAN;
  1008.         segmentLength:            LONGINT;                                {  NEW: <-  valid first call in a segment  }
  1009.         segmentID:                LONGINT;                                {  NEW: <-> identifier for this segment  }
  1010.     END;
  1011.  
  1012.     MSAMGetEnclosurePBPtr = ^MSAMGetEnclosurePB;
  1013.     MSAMGetEnclosurePB = RECORD
  1014.         qLink:                    Ptr;
  1015.         reservedH1:                LONGINT;
  1016.         reservedH2:                LONGINT;
  1017.         ioCompletion:            MSAMIOCompletionUPP;
  1018.         ioResult:                OSErr;
  1019.         saveA5:                    LONGINT;
  1020.         reqCode:                INTEGER;
  1021.         mailMsgRef:                MailMsgRef;
  1022.         contentEnclosure:        BOOLEAN;
  1023.         padByte:                SInt8;
  1024.         buffer:                    MailBuffer;
  1025.         endOfFile:                BOOLEAN;
  1026.         endOfEnclosures:        BOOLEAN;
  1027.     END;
  1028.  
  1029.     MailBlockInfoPtr = ^MailBlockInfo;
  1030.     MailBlockInfo = RECORD
  1031.         blockType:                OCECreatorType;
  1032.         offset:                    LONGINT;
  1033.         blockLength:            LONGINT;
  1034.     END;
  1035.  
  1036.     MSAMEnumerateBlocksPBPtr = ^MSAMEnumerateBlocksPB;
  1037.     MSAMEnumerateBlocksPB = RECORD
  1038.         qLink:                    Ptr;
  1039.         reservedH1:                LONGINT;
  1040.         reservedH2:                LONGINT;
  1041.         ioCompletion:            MSAMIOCompletionUPP;
  1042.         ioResult:                OSErr;
  1043.         saveA5:                    LONGINT;
  1044.         reqCode:                INTEGER;
  1045.         mailMsgRef:                MailMsgRef;
  1046.         startIndex:                INTEGER;                                {  starts at 1  }
  1047.         buffer:                    MailBuffer;
  1048.                                                                         {      buffer contains a Mail Reply. Each tuple is a MailBlockInfo  }
  1049.         nextIndex:                INTEGER;
  1050.         more:                    BOOLEAN;
  1051.         filler1:                BOOLEAN;
  1052.     END;
  1053.  
  1054.     MSAMGetBlockPBPtr = ^MSAMGetBlockPB;
  1055.     MSAMGetBlockPB = RECORD
  1056.         qLink:                    Ptr;
  1057.         reservedH1:                LONGINT;
  1058.         reservedH2:                LONGINT;
  1059.         ioCompletion:            MSAMIOCompletionUPP;
  1060.         ioResult:                OSErr;
  1061.         saveA5:                    LONGINT;
  1062.         reqCode:                INTEGER;
  1063.         mailMsgRef:                MailMsgRef;
  1064.         blockType:                OCECreatorType;
  1065.         blockIndex:                INTEGER;
  1066.         buffer:                    MailBuffer;
  1067.         dataOffset:                LONGINT;
  1068.         endOfBlock:                BOOLEAN;
  1069.         padByte:                SInt8;
  1070.         remaining:                LONGINT;
  1071.     END;
  1072.  
  1073. { YOU SHOULD BE USING THE NEW FORM OF MARK RECIPIENTS
  1074.  * THIS VERSION IS MUCH SLOWER AND KEPT FOR COMPATIBILITY
  1075.  * REASONS.
  1076. }
  1077. { not valid for tunnel form letters }
  1078.     MSAMMarkRecipientsPBPtr = ^MSAMMarkRecipientsPB;
  1079.     MSAMMarkRecipientsPB = RECORD
  1080.         qLink:                    Ptr;
  1081.         reservedH1:                LONGINT;
  1082.         reservedH2:                LONGINT;
  1083.         ioCompletion:            MSAMIOCompletionUPP;
  1084.         ioResult:                OSErr;
  1085.         saveA5:                    LONGINT;
  1086.         reqCode:                INTEGER;
  1087.         queueRef:                MSAMQueueRef;
  1088.         seqNum:                    LONGINT;
  1089.         buffer:                    MailBuffer;                                {      buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked.  }
  1090.     END;
  1091.  
  1092.  * same as MSAMMarkRecipients except it takes a mailMsgRef instead of 
  1093.  * queueRef, seqNum 
  1094. }
  1095. { not valid for tunnel form letters }
  1096.     MSAMnMarkRecipientsPBPtr = ^MSAMnMarkRecipientsPB;
  1097.     MSAMnMarkRecipientsPB = RECORD
  1098.         qLink:                    Ptr;
  1099.         reservedH1:                LONGINT;
  1100.         reservedH2:                LONGINT;
  1101.         ioCompletion:            MSAMIOCompletionUPP;
  1102.         ioResult:                OSErr;
  1103.         saveA5:                    LONGINT;
  1104.         reqCode:                INTEGER;
  1105.         mailMsgRef:                MailMsgRef;
  1106.         buffer:                    MailBuffer;                                {      buffer contains a Mail Reply. Each tuple is an unsigned short, the index of a recipient to be marked.  }
  1107.     END;
  1108.  
  1109. {**************************************************************************************}
  1110.     MSAMCreatePBPtr = ^MSAMCreatePB;
  1111.     MSAMCreatePB = RECORD
  1112.         qLink:                    Ptr;
  1113.         reservedH1:                LONGINT;
  1114.         reservedH2:                LONGINT;
  1115.         ioCompletion:            MSAMIOCompletionUPP;
  1116.         ioResult:                OSErr;
  1117.         saveA5:                    LONGINT;
  1118.         reqCode:                INTEGER;
  1119.         queueRef:                MSAMQueueRef;
  1120.         asLetter:                BOOLEAN;                                {  indicate if we should create as letter or msg  }
  1121.         filler1:                BOOLEAN;
  1122.         msgType:                IPMMsgType;                                {  up to application discretion: must be of IPMSenderTag  kIPMOSFormatType for asLetter=true  }
  1123.         refCon:                    LONGINT;                                {  for messages only  }
  1124.         seqNum:                    LONGINT;                                {  set if creating message in the inQueue  }
  1125.         tunnelForm:                BOOLEAN;                                {  if true tunnelForm else newForm  }
  1126.         bccRecipients:            BOOLEAN;                                {  true if creating letter with bcc recipients  }
  1127.         newRef:                    MailMsgRef;
  1128.     END;
  1129.  
  1130.     MSAMBeginNestedPBPtr = ^MSAMBeginNestedPB;
  1131.     MSAMBeginNestedPB = RECORD
  1132.         qLink:                    Ptr;
  1133.         reservedH1:                LONGINT;
  1134.         reservedH2:                LONGINT;
  1135.         ioCompletion:            MSAMIOCompletionUPP;
  1136.         ioResult:                OSErr;
  1137.         saveA5:                    LONGINT;
  1138.         reqCode:                INTEGER;
  1139.         mailMsgRef:                MailMsgRef;
  1140.         refCon:                    LONGINT;                                {  for messages only  }
  1141.         msgType:                IPMMsgType;
  1142.     END;
  1143.  
  1144.     MSAMEndNestedPBPtr = ^MSAMEndNestedPB;
  1145.     MSAMEndNestedPB = RECORD
  1146.         qLink:                    Ptr;
  1147.         reservedH1:                LONGINT;
  1148.         reservedH2:                LONGINT;
  1149.         ioCompletion:            MSAMIOCompletionUPP;
  1150.         ioResult:                OSErr;
  1151.         saveA5:                    LONGINT;
  1152.         reqCode:                INTEGER;
  1153.         mailMsgRef:                MailMsgRef;
  1154.     END;
  1155.  
  1156.     MSAMSubmitPBPtr = ^MSAMSubmitPB;
  1157.     MSAMSubmitPB = RECORD
  1158.         qLink:                    Ptr;
  1159.         reservedH1:                LONGINT;
  1160.         reservedH2:                LONGINT;
  1161.         ioCompletion:            MSAMIOCompletionUPP;
  1162.         ioResult:                OSErr;
  1163.         saveA5:                    LONGINT;
  1164.         reqCode:                INTEGER;
  1165.         mailMsgRef:                MailMsgRef;
  1166.         submitFlag:                BOOLEAN;
  1167.         padByte:                SInt8;
  1168.         msgID:                    MailLetterID;
  1169.     END;
  1170.  
  1171.     MSAMPutMsgHeaderPBPtr = ^MSAMPutMsgHeaderPB;
  1172.     MSAMPutMsgHeaderPB = RECORD
  1173.         qLink:                    Ptr;
  1174.         reservedH1:                LONGINT;
  1175.         reservedH2:                LONGINT;
  1176.         ioCompletion:            MSAMIOCompletionUPP;
  1177.         ioResult:                OSErr;
  1178.         saveA5:                    LONGINT;
  1179.         reqCode:                INTEGER;
  1180.         mailMsgRef:                MailMsgRef;
  1181.         replyQueue:                OCERecipientPtr;
  1182.         sender:                    IPMSenderPtr;
  1183.         deliveryNotification:    SInt8;
  1184.         priority:                SInt8;
  1185.     END;
  1186.  
  1187.     MSAMPutAttributePBPtr = ^MSAMPutAttributePB;
  1188.     MSAMPutAttributePB = RECORD
  1189.         qLink:                    Ptr;
  1190.         reservedH1:                LONGINT;
  1191.         reservedH2:                LONGINT;
  1192.         ioCompletion:            MSAMIOCompletionUPP;
  1193.         ioResult:                OSErr;
  1194.         saveA5:                    LONGINT;
  1195.         reqCode:                INTEGER;
  1196.         mailMsgRef:                MailMsgRef;
  1197.         attrID:                    MailAttributeID;                        {  kMailIndicationsBit thru kMailSubjectBit  }
  1198.         buffer:                    MailBuffer;
  1199.     END;
  1200.  
  1201.     MSAMPutRecipientPBPtr = ^MSAMPutRecipientPB;
  1202.     MSAMPutRecipientPB = RECORD
  1203.         qLink:                    Ptr;
  1204.         reservedH1:                LONGINT;
  1205.         reservedH2:                LONGINT;
  1206.         ioCompletion:            MSAMIOCompletionUPP;
  1207.         ioResult:                OSErr;
  1208.         saveA5:                    LONGINT;
  1209.         reqCode:                INTEGER;
  1210.         mailMsgRef:                MailMsgRef;
  1211.         attrID:                    MailAttributeID;                        {  kMailFromBit thru kMailBccBit  }
  1212.         recipient:                MailRecipientPtr;
  1213.         responsible:            BOOLEAN;                                {  valid for server and message msams only  }
  1214.         filler1:                BOOLEAN;
  1215.     END;
  1216.  
  1217.     MSAMPutContentPBPtr = ^MSAMPutContentPB;
  1218.     MSAMPutContentPB = RECORD
  1219.         qLink:                    Ptr;
  1220.         reservedH1:                LONGINT;
  1221.         reservedH2:                LONGINT;
  1222.         ioCompletion:            MSAMIOCompletionUPP;
  1223.         ioResult:                OSErr;
  1224.         saveA5:                    LONGINT;
  1225.         reqCode:                INTEGER;
  1226.         mailMsgRef:                MailMsgRef;
  1227.         segmentType:            MailSegmentType;
  1228.         append:                    BOOLEAN;
  1229.         padByte:                SInt8;
  1230.         buffer:                    MailBuffer;
  1231.         textScrap:                StScrpRecPtr;
  1232.         startNewScript:            BOOLEAN;
  1233.         filler1:                BOOLEAN;
  1234.         script:                    ScriptCode;                                {  valid only if startNewScript is true  }
  1235.     END;
  1236.  
  1237.     MSAMPutEnclosurePBPtr = ^MSAMPutEnclosurePB;
  1238.     MSAMPutEnclosurePB = RECORD
  1239.         qLink:                    Ptr;
  1240.         reservedH1:                LONGINT;
  1241.         reservedH2:                LONGINT;
  1242.         ioCompletion:            MSAMIOCompletionUPP;
  1243.         ioResult:                OSErr;
  1244.         saveA5:                    LONGINT;
  1245.         reqCode:                INTEGER;
  1246.         mailMsgRef:                MailMsgRef;
  1247.         contentEnclosure:        BOOLEAN;
  1248.         padByte:                SInt8;
  1249.         hfs:                    BOOLEAN;                                {  true => in file system, false => in memory  }
  1250.         append:                    BOOLEAN;
  1251.         buffer:                    MailBuffer;                                {  Unused if hfs == true  }
  1252.         enclosure:                FSSpec;
  1253.         addlInfo:                MailEnclosureInfo;
  1254.     END;
  1255.  
  1256.     MSAMPutBlockPBPtr = ^MSAMPutBlockPB;
  1257.     MSAMPutBlockPB = RECORD
  1258.         qLink:                    Ptr;
  1259.         reservedH1:                LONGINT;
  1260.         reservedH2:                LONGINT;
  1261.         ioCompletion:            MSAMIOCompletionUPP;
  1262.         ioResult:                OSErr;
  1263.         saveA5:                    LONGINT;
  1264.         reqCode:                INTEGER;
  1265.         mailMsgRef:                MailMsgRef;
  1266.         refCon:                    LONGINT;                                {  for messages only  }
  1267.         blockType:                OCECreatorType;
  1268.         append:                    BOOLEAN;
  1269.         filler1:                BOOLEAN;
  1270.         buffer:                    MailBuffer;
  1271.         mode:                    MailBlockMode;                            {  if blockType is kMailTunnelLtrType or kMailHopInfoType  mode is assumed to be kMailFromMark  }
  1272.         offset:                    LONGINT;
  1273.     END;
  1274.  
  1275. {**************************************************************************************}
  1276.     MSAMCreateReportPBPtr = ^MSAMCreateReportPB;
  1277.     MSAMCreateReportPB = RECORD
  1278.         qLink:                    Ptr;
  1279.         reservedH1:                LONGINT;
  1280.         reservedH2:                LONGINT;
  1281.         ioCompletion:            MSAMIOCompletionUPP;
  1282.         ioResult:                OSErr;
  1283.         saveA5:                    LONGINT;
  1284.         reqCode:                INTEGER;
  1285.         queueRef:                MSAMQueueRef;                            {  to distinguish personal and server MSAMs  }
  1286.         mailMsgRef:                MailMsgRef;
  1287.         msgID:                    MailLetterID;                            {  kMailLetterIDBit of letter being reported upon  }
  1288.         sender:                    MailRecipientPtr;                        {  sender of the letter you are creating report on  }
  1289.     END;
  1290.  
  1291.     MSAMPutRecipientReportPBPtr = ^MSAMPutRecipientReportPB;
  1292.     MSAMPutRecipientReportPB = RECORD
  1293.         qLink:                    Ptr;
  1294.         reservedH1:                LONGINT;
  1295.         reservedH2:                LONGINT;
  1296.         ioCompletion:            MSAMIOCompletionUPP;
  1297.         ioResult:                OSErr;
  1298.         saveA5:                    LONGINT;
  1299.         reqCode:                INTEGER;
  1300.         mailMsgRef:                MailMsgRef;
  1301.         recipientIndex:            INTEGER;                                {  recipient index in the original letter  }
  1302.         result:                    OSErr;                                    {  result of sending the recipient  }
  1303.     END;
  1304.  
  1305. {**************************************************************************************}
  1306.     MailWakeupPMSAMPBPtr = ^MailWakeupPMSAMPB;
  1307.     MailWakeupPMSAMPB = RECORD
  1308.         qLink:                    Ptr;
  1309.         reservedH1:                LONGINT;
  1310.         reservedH2:                LONGINT;
  1311.         ioCompletion:            MSAMIOCompletionUPP;
  1312.         ioResult:                OSErr;
  1313.         saveA5:                    LONGINT;
  1314.         reqCode:                INTEGER;
  1315.         pmsamCID:                CreationID;
  1316.         mailSlotID:                MailSlotID;
  1317.     END;
  1318.  
  1319.     MailCreateMailSlotPBPtr = ^MailCreateMailSlotPB;
  1320.     MailCreateMailSlotPB = RECORD
  1321.         qLink:                    Ptr;
  1322.         reservedH1:                LONGINT;
  1323.         reservedH2:                LONGINT;
  1324.         ioCompletion:            MSAMIOCompletionUPP;
  1325.         ioResult:                OSErr;
  1326.         saveA5:                    LONGINT;
  1327.         reqCode:                INTEGER;
  1328.         mailboxRef:                MailboxRef;
  1329.         timeout:                LONGINT;
  1330.         pmsamCID:                CreationID;
  1331.         smca:                    SMCA;
  1332.     END;
  1333.  
  1334.     MailModifyMailSlotPBPtr = ^MailModifyMailSlotPB;
  1335.     MailModifyMailSlotPB = RECORD
  1336.         qLink:                    Ptr;
  1337.         reservedH1:                LONGINT;
  1338.         reservedH2:                LONGINT;
  1339.         ioCompletion:            MSAMIOCompletionUPP;
  1340.         ioResult:                OSErr;
  1341.         saveA5:                    LONGINT;
  1342.         reqCode:                INTEGER;
  1343.         mailboxRef:                MailboxRef;
  1344.         timeout:                LONGINT;
  1345.         pmsamCID:                CreationID;
  1346.         smca:                    SMCA;
  1347.     END;
  1348.  
  1349.     MSAMParamPtr = ^MSAMParam;
  1350.     MSAMParam = RECORD
  1351.         CASE INTEGER OF
  1352.         0: (
  1353.             qLink:                Ptr;
  1354.             reservedH1:            LONGINT;
  1355.             reservedH2:            LONGINT;
  1356.             ioCompletion:        MSAMIOCompletionUPP;
  1357.             ioResult:            OSErr;
  1358.             saveA5:                LONGINT;
  1359.             reqCode:            INTEGER;
  1360.            );
  1361.         1: (
  1362.             pmsamGetMSAMRecord:    PMSAMGetMSAMRecordPB;
  1363.             );
  1364.         2: (
  1365.             pmsamOpenQueues:    PMSAMOpenQueuesPB;
  1366.             );
  1367.         3: (
  1368.             pmsamSetStatus:        PMSAMSetStatusPB;
  1369.             );
  1370.         4: (
  1371.             pmsamLogError:        PMSAMLogErrorPB;
  1372.             );
  1373.         5: (
  1374.             smsamSetup:            SMSAMSetupPB;
  1375.             );
  1376.         6: (
  1377.             smsamStartup:        SMSAMStartupPB;
  1378.             );
  1379.         7: (
  1380.             smsamShutdown:        SMSAMShutdownPB;
  1381.             );
  1382.         8: (
  1383.             msamEnumerate:        MSAMEnumeratePB;
  1384.             );
  1385.         9: (
  1386.             msamDelete:            MSAMDeletePB;
  1387.             );
  1388.         10: (
  1389.             msamOpen:            MSAMOpenPB;
  1390.             );
  1391.         11: (
  1392.             msamOpenNested:        MSAMOpenNestedPB;
  1393.             );
  1394.         12: (
  1395.             msamClose:            MSAMClosePB;
  1396.             );
  1397.         13: (
  1398.             msamGetMsgHeader:    MSAMGetMsgHeaderPB;
  1399.             );
  1400.         14: (
  1401.             msamGetAttributes:    MSAMGetAttributesPB;
  1402.             );
  1403.         15: (
  1404.             msamGetRecipients:    MSAMGetRecipientsPB;
  1405.             );
  1406.         16: (
  1407.             msamGetContent:        MSAMGetContentPB;
  1408.             );
  1409.         17: (
  1410.             msamGetEnclosure:    MSAMGetEnclosurePB;
  1411.             );
  1412.         18: (
  1413.             msamEnumerateBlocks: MSAMEnumerateBlocksPB;
  1414.             );
  1415.         19: (
  1416.             msamGetBlock:        MSAMGetBlockPB;
  1417.             );
  1418.         20: (
  1419.             msamMarkRecipients:    MSAMMarkRecipientsPB;
  1420.             );
  1421.         21: (
  1422.             msamnMarkRecipients: MSAMnMarkRecipientsPB;
  1423.             );
  1424.         22: (
  1425.             msamCreate:            MSAMCreatePB;
  1426.             );
  1427.         23: (
  1428.             msamBeginNested:    MSAMBeginNestedPB;
  1429.             );
  1430.         24: (
  1431.             msamEndNested:        MSAMEndNestedPB;
  1432.             );
  1433.         25: (
  1434.             msamSubmit:            MSAMSubmitPB;
  1435.             );
  1436.         26: (
  1437.             msamPutMsgHeader:    MSAMPutMsgHeaderPB;
  1438.             );
  1439.         27: (
  1440.             msamPutAttribute:    MSAMPutAttributePB;
  1441.             );
  1442.         28: (
  1443.             msamPutRecipient:    MSAMPutRecipientPB;
  1444.             );
  1445.         29: (
  1446.             msamPutContent:        MSAMPutContentPB;
  1447.             );
  1448.         30: (
  1449.             msamPutEnclosure:    MSAMPutEnclosurePB;                        {  this field is SYSTEM8_DEPRECATED }
  1450.             );
  1451.         31: (
  1452.             msamPutBlock:        MSAMPutBlockPB;
  1453.             );
  1454.         32: (
  1455.             msamCreateReport:    MSAMCreateReportPB;                        {  Reports and Error Handling Calls  }
  1456.             );
  1457.         33: (
  1458.             msamPutRecipientReport: MSAMPutRecipientReportPB;
  1459.             );
  1460.         34: (
  1461.             pmsamCreateMsgSummary: PMSAMCreateMsgSummaryPB;
  1462.             );
  1463.         35: (
  1464.             pmsamPutMsgSummary:    PMSAMPutMsgSummaryPB;
  1465.             );
  1466.         36: (
  1467.             pmsamGetMsgSummary:    PMSAMGetMsgSummaryPB;
  1468.             );
  1469.         37: (
  1470.             wakeupPMSAM:        MailWakeupPMSAMPB;
  1471.             );
  1472.         38: (
  1473.             createMailSlot:        MailCreateMailSlotPB;
  1474.             );
  1475.         39: (
  1476.             modifyMailSlot:        MailModifyMailSlotPB;
  1477.             );
  1478.     END;
  1479.  
  1480. TempMSAMParam    =    MSAMParam;
  1481.  
  1482. CONST
  1483.     uppMSAMIOCompletionProcInfo = $00009802;
  1484.  
  1485. PROCEDURE CallMSAMIOCompletionProc(VAR paramBlock: TempMSAMParam; userRoutine: MSAMIOCompletionUPP);
  1486.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1487.     {To be implemented:  Glue to move parameters into registers.}
  1488.     {$ENDC}
  1489.  
  1490. FUNCTION NewMSAMIOCompletionProc(userRoutine: MSAMIOCompletionProcPtr): MSAMIOCompletionUPP;
  1491.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1492.     INLINE $2E9F;
  1493.     {$ENDC}
  1494. { ASYNCHRONOUS ONLY, client must call WaitNextEvent }
  1495. FUNCTION MailCreateMailSlot(VAR paramBlock: MSAMParam): OSErr;
  1496.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1497.     INLINE $7001, $1F00, $3F3C, $052B, $AA5E;
  1498.     {$ENDC}
  1499. { ASYNCHRONOUS ONLY, client must call WaitNextEvent }
  1500. FUNCTION MailModifyMailSlot(VAR paramBlock: MSAMParam): OSErr;
  1501.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1502.     INLINE $7001, $1F00, $3F3C, $052C, $AA5E;
  1503.     {$ENDC}
  1504. { ASYNCHRONOUS ONLY, client must call WaitNextEvent }
  1505. FUNCTION MailWakeupPMSAM(VAR paramBlock: MSAMParam): OSErr;
  1506.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1507.     INLINE $7001, $1F00, $3F3C, $0507, $AA5E;
  1508.     {$ENDC}
  1509. { Personal MSAM Glue Routines }
  1510. FUNCTION PMSAMOpenQueues(VAR paramBlock: MSAMParam): OSErr;
  1511.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1512.     INLINE $7000, $1F00, $3F3C, $0500, $AA5E;
  1513.     {$ENDC}
  1514. FUNCTION PMSAMSetStatus(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1515.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1516.     INLINE $3F3C, $0527, $AA5E;
  1517.     {$ENDC}
  1518. { SYNC ONLY }
  1519. FUNCTION PMSAMGetMSAMRecord(VAR paramBlock: MSAMParam): OSErr;
  1520.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1521.     INLINE $7000, $1F00, $3F3C, $0506, $AA5E;
  1522.     {$ENDC}
  1523. { Server MSAM Glue Routines }
  1524. { SYNC ONLY }
  1525. FUNCTION SMSAMSetup(VAR paramBlock: MSAMParam): OSErr;
  1526.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1527.     INLINE $7000, $1F00, $3F3C, $0523, $AA5E;
  1528.     {$ENDC}
  1529. { SYNC ONLY }
  1530. FUNCTION SMSAMStartup(VAR paramBlock: MSAMParam): OSErr;
  1531.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1532.     INLINE $7000, $1F00, $3F3C, $0501, $AA5E;
  1533.     {$ENDC}
  1534. FUNCTION SMSAMShutdown(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1535.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1536.     INLINE $3F3C, $0502, $AA5E;
  1537.     {$ENDC}
  1538. { Get Interface Glue Routines }
  1539. FUNCTION MSAMEnumerate(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1540.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1541.     INLINE $3F3C, $0503, $AA5E;
  1542.     {$ENDC}
  1543. FUNCTION MSAMDelete(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1544.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1545.     INLINE $3F3C, $0504, $AA5E;
  1546.     {$ENDC}
  1547. FUNCTION MSAMMarkRecipients(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1548.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1549.     INLINE $3F3C, $0505, $AA5E;
  1550.     {$ENDC}
  1551. FUNCTION MSAMnMarkRecipients(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1552.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1553.     INLINE $3F3C, $0512, $AA5E;
  1554.     {$ENDC}
  1555. FUNCTION MSAMOpen(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1556.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1557.     INLINE $3F3C, $0508, $AA5E;
  1558.     {$ENDC}
  1559. FUNCTION MSAMOpenNested(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1560.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1561.     INLINE $3F3C, $0509, $AA5E;
  1562.     {$ENDC}
  1563. FUNCTION MSAMClose(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1564.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1565.     INLINE $3F3C, $050A, $AA5E;
  1566.     {$ENDC}
  1567. FUNCTION MSAMGetRecipients(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1568.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1569.     INLINE $3F3C, $050C, $AA5E;
  1570.     {$ENDC}
  1571. FUNCTION MSAMGetAttributes(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1572.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1573.     INLINE $3F3C, $050B, $AA5E;
  1574.     {$ENDC}
  1575. FUNCTION MSAMGetContent(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1576.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1577.     INLINE $3F3C, $050D, $AA5E;
  1578.     {$ENDC}
  1579. FUNCTION MSAMGetEnclosure(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1580.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1581.     INLINE $3F3C, $050E, $AA5E;
  1582.     {$ENDC}
  1583. FUNCTION MSAMEnumerateBlocks(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1584.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1585.     INLINE $3F3C, $050F, $AA5E;
  1586.     {$ENDC}
  1587. FUNCTION MSAMGetBlock(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1588.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1589.     INLINE $3F3C, $0510, $AA5E;
  1590.     {$ENDC}
  1591. FUNCTION MSAMGetMsgHeader(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1592.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1593.     INLINE $3F3C, $0511, $AA5E;
  1594.     {$ENDC}
  1595. { Put Interface Glue Routines }
  1596. FUNCTION MSAMCreate(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1597.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1598.     INLINE $3F3C, $0514, $AA5E;
  1599.     {$ENDC}
  1600. FUNCTION MSAMBeginNested(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1601.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1602.     INLINE $3F3C, $0515, $AA5E;
  1603.     {$ENDC}
  1604. FUNCTION MSAMEndNested(VAR paramBlock: MSAMParam): OSErr;
  1605.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1606.     INLINE $7000, $1F00, $3F3C, $0516, $AA5E;
  1607.     {$ENDC}
  1608. {  SYNCHRONOUS ONLY }
  1609. FUNCTION MSAMSubmit(VAR paramBlock: MSAMParam): OSErr;
  1610.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1611.     INLINE $7000, $1F00, $3F3C, $0517, $AA5E;
  1612.     {$ENDC}
  1613. FUNCTION MSAMPutAttribute(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1614.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1615.     INLINE $3F3C, $0518, $AA5E;
  1616.     {$ENDC}
  1617. FUNCTION MSAMPutRecipient(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1618.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1619.     INLINE $3F3C, $0519, $AA5E;
  1620.     {$ENDC}
  1621. FUNCTION MSAMPutContent(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1622.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1623.     INLINE $3F3C, $051A, $AA5E;
  1624.     {$ENDC}
  1625. {  SYNCHRONOUS ONLY }
  1626. FUNCTION MSAMPutEnclosure(VAR paramBlock: MSAMParam): OSErr;
  1627.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1628.     INLINE $7000, $1F00, $3F3C, $051B, $AA5E;
  1629.     {$ENDC}
  1630. FUNCTION MSAMPutBlock(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1631.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1632.     INLINE $3F3C, $051C, $AA5E;
  1633.     {$ENDC}
  1634. FUNCTION MSAMPutMsgHeader(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1635.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1636.     INLINE $3F3C, $051D, $AA5E;
  1637.     {$ENDC}
  1638. { Reports and Error Handling Glue Routines }
  1639. FUNCTION MSAMCreateReport(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1640.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1641.     INLINE $3F3C, $051F, $AA5E;
  1642.     {$ENDC}
  1643. FUNCTION MSAMPutRecipientReport(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1644.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1645.     INLINE $3F3C, $0520, $AA5E;
  1646.     {$ENDC}
  1647. FUNCTION PMSAMLogError(VAR paramBlock: MSAMParam): OSErr;
  1648.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1649.     INLINE $7000, $1F00, $3F3C, $0521, $AA5E;
  1650.     {$ENDC}
  1651. { MsgSummary Glue Routines }
  1652. FUNCTION PMSAMCreateMsgSummary(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1653.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1654.     INLINE $3F3C, $0522, $AA5E;
  1655.     {$ENDC}
  1656. FUNCTION PMSAMPutMsgSummary(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1657.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1658.     INLINE $3F3C, $0525, $AA5E;
  1659.     {$ENDC}
  1660. FUNCTION PMSAMGetMsgSummary(VAR paramBlock: MSAMParam; asyncFlag: BOOLEAN): OSErr;
  1661.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1662.     INLINE $3F3C, $0526, $AA5E;
  1663.     {$ENDC}
  1664.  
  1665. {$ALIGN RESET}
  1666. {$POP}
  1667.  
  1668. {$SETC UsingIncludes := OCEMailIncludes}
  1669.  
  1670. {$ENDC} {__OCEMAIL__}
  1671.  
  1672. {$IFC NOT UsingIncludes}
  1673.  END.
  1674. {$ENDC}
  1675.